﻿<UserControl
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:base="clr-namespace:Flare.DB"
      xmlns:Controls="clr-namespace:Flare.Controls" 
      x:Class="Flare.Pages.Hards.Create" 
      mc:Ignorable="d"
    d:DesignHeight="600" d:DesignWidth="800">

    <UserControl.Resources>
        <ObjectDataProvider x:Key="general_departmentsDataSet" ObjectType="{x:Type base:general_departments}" MethodName="Index" IsAsynchronous="False" />

        <ObjectDataProvider x:Key="general_roomsDataSet" ObjectType="{x:Type base:general_rooms}" MethodName="Index" IsAsynchronous="False">
            <ObjectDataProvider.MethodParameters>
                <x:Null/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>


        <ObjectDataProvider x:Key="equipment_typesDataSet" ObjectType="{x:Type base:equipment_types}"  MethodName="Index" />
        <ObjectDataProvider x:Key="equipment_marksDataSet" ObjectType="{x:Type base:equipment_marks}" MethodName="Index">
            <ObjectDataProvider.MethodParameters>
                <x:NullExtension/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>

        <ObjectDataProvider x:Key="equipment_modelsDataSet" ObjectType="{x:Type base:equipment_models}" MethodName="Index">
            <ObjectDataProvider.MethodParameters>
                <x:NullExtension/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </UserControl.Resources>

    <DockPanel LastChildFill="False" VerticalAlignment="Top">
        <Controls:FlameMenu x:Name="Department" Caption="Отдел" SelectedValuePath="id_department" DisplayMemberPath="department" DockPanel.Dock="Top"
                      ItemsSource="{Binding Source={StaticResource general_departmentsDataSet}}" SelectionChanged="Department_SelectionChanged" 
                            SelectedValue="{Binding id_department, Mode=OneWay}"/>

        <Controls:FlameMenu x:Name="Room" Caption="Кабинет" SelectedValuePath="id_room" DisplayMemberPath="room" DockPanel.Dock="Top"
                      ItemsSource="{Binding Source={StaticResource general_roomsDataSet}}" SelectedValue="{Binding id_room, Mode=OneWay}"/>

        <Controls:FlameMenu x:Name="techType" Caption="Тип" DockPanel.Dock="Top" SelectedValuePath="id_type" DisplayMemberPath="type"
                      ItemsSource="{Binding Source={StaticResource equipment_typesDataSet}}" SelectionChanged="techType_SelectionChanged" 
                            SelectedValue="{Binding id_type, Mode=OneWay}"/>

        <Controls:FlameMenu x:Name="techMark" Caption="Марка" DockPanel.Dock="Top" SelectedValuePath="id_mark" DisplayMemberPath="mark"
                      ItemsSource="{Binding Source={StaticResource equipment_marksDataSet}}" SelectionChanged="techMark_SelectionChanged" 
                            SelectedValue="{Binding id_mark, Mode=OneWay}" />

        <Controls:FlameMenu x:Name="techModel" Caption="Модель" DockPanel.Dock="Top" SelectedValuePath="id_model" DisplayMemberPath="model"
                      ItemsSource="{Binding Source={StaticResource equipment_modelsDataSet}}" SelectedValue="{Binding id_model, Mode=OneWay}" />

        <Controls:FlameTbox x:Name="hard_ware_inventory_number" Header="Инвентарный номер" CharacterCasing="Upper" Margin="10,40,0,0" 
                            DockPanel.Dock="Top" Text="{Binding inventory_number}" Width="600" />
        <Controls:FlameTbox x:Name="hard_ware_factory_number" Header="Заводской номер" Margin="10,10,0,0" DockPanel.Dock="Top" 
                            Text="{Binding factory_number, Mode=OneWay}" Width="600" />
        
        <Controls:FlameTbox x:Name="hard_ware_description" Header="Примечание" Margin="10,10,0,0" DockPanel.Dock="Top" 
                            Width="600" />

        <Controls:FlameButtonInfo x:Name="insertButton" Content="Добавить" HorizontalAlignment="Left" DockPanel.Dock="Top" Margin="10,40,0,0" Click="insertButton_Click"/>
    </DockPanel>
</UserControl>
